const Actions = {
    "befor-game-enter" : {
        _state : null,
        handler( res , rej ){
            $HOOK && $HOOK.run( "game-enter" );
            console.log("befor-game-enter");
            $RES.use(
                "sound-back-jian",
                // "top-img-1",
                // "top-img-2",
                "fab-anode",
                "img-zidan-boom",
                "img-zidan-boom1",
                "img-zidan-boom2"
            )
            .then(()=>{
                res(true)
            })
        }
    },

    "befor-page-change" : {
        _state : null,
        handler( res , rej , frmPage , toPage ){
            $G.getRef("curpage").set( toPage );
            $HOOK && $HOOK.run( "page-change" , frmPage, toPage );

            console.log("befor-page-change :" + frmPage +"=>"+ toPage);
            res( true );
        }
    }
}

module.exports = Actions;